﻿Public Class WelcomeForm

    Private Sub linkLogin_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles linkLogin.LinkClicked
        If Utils.isConnected() Then
            'Dim LoginForm As New LoginForm
            MainForm.enterView("LoginForm")
        Else
            MessageBox.Show("Database isNot Connected,Please setting before log in", "Connection Analyst", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
        
    End Sub

    Private Sub WelcomeForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        MainForm.setLoggedIn(False)

    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub linkSettings_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles linkSettings.LinkClicked
        Session.isSettingValid = False
        Dim ValidasiSetting As New ValidasiSetting
        ValidasiSetting.ShowDialog()
        If Session.isSettingValid Then
            'Dim DatabaseSettingsPage = New DatabaseSettingsPage
            MainForm.enterView("DatabaseSettingsPage")
        End If


    End Sub
End Class
